package com.example;

import com.example.context.MyApplicationContext;
import com.example.service.IUserService;

/**
 * 模拟一个spring启动类
 */
public class MyBootStrap {

    public static void main(String[] args) {

        MyApplicationContext myApplicationContext = new MyApplicationContext<>();
//        myApplicationContext.initContext();
//        System.out.println(myApplicationContext.getBean(IUserService.class));

        myApplicationContext.load();
        IUserService userService = (IUserService) myApplicationContext.getBean(IUserService.class);
        userService.getUserName(1);

    }

}
